overlay: Don't offset the main window snapshot
authorTimm Bäder <mail@baedert.org>
Sun, 13 Jan 2019 04:41:43 +0000 (05:41 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 13 Jan 2019 07:23:25 +0000 (08:23 +0100)
We need the node without an offset applied.

Fixes the rose picture being offset in tests/testoverlay

gtk/gtkoverlay.c

index 10fc2a82504cf5854d741c517f113bb3012421a5..86b2004f2e1e43585360486be2219e7f17c12607 100644 (file)
@@ -722,9 +722,7 @@ gtk_overlay_snapshot (GtkWidget   *widget,
               GtkSnapshot *child_snapshot;
 
               child_snapshot = gtk_snapshot_new ();
-              gtk_snapshot_offset (child_snapshot, main_alloc.x, main_alloc.y);
               gtk_widget_snapshot (main_widget, child_snapshot);
-              gtk_snapshot_offset (child_snapshot, -main_alloc.x, -main_alloc.y);
               main_widget_node = gtk_snapshot_free_to_node (child_snapshot);
             }